<script setup lang="ts">
import { reactive } from 'vue';
const onClosed = () => console.log('closed');
const onClick = () => console.log('click');

const baseState = {
  state: reactive({
    show: false,
    desc: ''
  }),
  methods: {
    cellClick() {
      baseState.state.show = true;
    }
  }
};

const showNotify = (msg: string) => {
  baseState.state.desc = msg;
  baseState.methods.cellClick();
};
</script>

<template>
  <nut-notify v-model:visible="baseState.state.show" :msg="baseState.state.desc" @click="onClick" @closed="onClosed" />
</template>

<style scoped lang="scss"></style>
